﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BPM.Foundation.WFDB;
using System.ServiceModel;

namespace BPM.Foundation.WFService
{
    [System.ServiceModel.ServiceContract(SessionMode = System.ServiceModel.SessionMode.NotAllowed)]
    public partial interface IWorkflowService
    {
        [System.ServiceModel.OperationContract]
        bool TestConnect();

        //-系统方法
        [System.ServiceModel.OperationContract]
        DateTime getServerTime();

        [System.ServiceModel.OperationContract]
        string getServerEdition();

        [System.ServiceModel.OperationContract]
        string link(string data);

        //-工作流模板管理
        [System.ServiceModel.OperationContract]
        int? insertWFTemplate(string pid, WF_Template template);

        [System.ServiceModel.OperationContract]
        WF_Template getWFTemplate(string pid, string templateID, string templateEdition);

        [System.ServiceModel.OperationContract]
        WF_Structure getWFStructure(string pid, string templateID, string templateEdition);

        [System.ServiceModel.OperationContract]
        List<WF_Template_V> searchWFTemplate(string pid, string templateID, string templateEdition);

        [System.ServiceModel.OperationContract]
        int? deleteWFTemplate(string pid, string templateID, string templateEdition);

        [System.ServiceModel.OperationContract]
        int? addStartWorkflowPower(string pid, WF_StartWorkflowPower wf_StartWorkflowPower);

        [System.ServiceModel.OperationContract]
        int? removeStartWorkflowPower(string pid, WF_StartWorkflowPower wf_StartWorkflowPower);

        [System.ServiceModel.OperationContract]
        List<WF_StartWorkflowPower_V> getStartWorkflowPower(string pid, string userNo, string departmentNo, string dutyNo);
        
        [System.ServiceModel.OperationContract]
        int? clearStateInfo(string pid, int testID);

        [System.ServiceModel.OperationContract]
        WF_Structure getProcessStructure(string pid, Guid instanceID);

        [System.ServiceModel.OperationContract]
        InstanceInfo getProcessRunInfo(string pid, Guid instanceID);

        [System.ServiceModel.OperationContract]
        int? saveInstanceInfo(string pid);

        [System.ServiceModel.OperationContract]
        int? deleteWFTemplateInfo(string pid, string templateID, string templateEdition);

        [System.ServiceModel.OperationContract]
        List<WF_StartWorkflowPower_V> getWFTemplateStartWorkflowPower(string pid, string templateId, string templateEdition);

        [System.ServiceModel.OperationContract]
        WF_BusinessForm getWFBusinessForm(string pid,string businessId,string startWindow);

        [System.ServiceModel.OperationContract]
        int? addWFBusinessForm(string pid,WF_BusinessForm wf_BusinessForm);

        [System.ServiceModel.OperationContract]
        int? updateWFBusinessForm(string pid, WF_BusinessForm wf_BusinessForm);

        [System.ServiceModel.OperationContract]
        WF_Instance getWFInstance(string pid,Guid instanceID);

        
    }
}
